package com.itheima.demo;

public class Test1 {

    public static void main(String[] args) {

        //目标：1.展示系统中的全部电影信息（名称、价格） 2.允许用户根据电影编号查询电影的详细信息

        //步骤1：定义一个电影类，以便创建电影对象，封装电影信息

        //步骤2：创建电影对象，并把电影信息封装到对象中（使用数组）
        Movie[] movies = new Movie[6];
        /*Movie m1 = new Movie(1,"唐人街探案1", 20.0);
        movies[0] = m1;*/
        movies[0] = new Movie(1,"唐人街探案1", 20.0);
        movies[1] = new Movie(2,"唐人街探案2", 25.0);
        movies[2] = new Movie(3,"唐人街探案3", 27.0);
        movies[3] = new Movie(4,"唐人街探案4", 29.0);
        movies[4] = new Movie(5,"唐人街探案5", 30.0);
        movies[5] = new Movie(6,"唐人街探案6", 35.0);

        //步骤3：设计电影操作类，专门负责电影数据的操作
        MovieOperator movieOperator = new MovieOperator(movies);
        movieOperator.showMovies();
        movieOperator.showMovieById();


    }
}
